using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Joy.Erp.Ufida.Pmc
{
    /// <summary>
    /// 物料供需平衡缓存服务接口
    /// </summary>
    public interface IMaterialBalanceCacheService
    {
        /// <summary>
        /// 检查缓存是否存在
        /// </summary>
        Task<bool> ExistsAsync(DateTime cutoffDate);

        /// <summary>
        /// 设置供需记录缓存
        /// </summary>
        Task SetSupplyDemandRecordsAsync(DateTime cutoffDate, List<SupplyDemandRecordDto> records);

        /// <summary>
        /// 获取供需记录缓存
        /// </summary>
        Task<List<SupplyDemandRecordDto>> GetSupplyDemandRecordsAsync(DateTime cutoffDate);

        /// <summary>
        /// 清除缓存
        /// </summary>
        Task ClearAsync();

        /// <summary>
        /// 清除指定日期的缓存
        /// </summary>
        Task ClearAsync(DateTime cutoffDate);
    }
}
